#!/usr/bin/env python
# -*- coding:utf-8 -*-
# Author:Taotie Ren

name_list = ['阿','哦','额','一','吴','于','波','破','莫']
name2 = ['zhang','wang','li']

print(name_list)
name_list.insert(3,'天')
name_list.insert(4,'下')
print(name_list)
name = name_list[2:9]
print(name)
name_list.remove("一")
print(name_list)
del name_list[3:5]
print(name_list)
name_list[3] = " 吴（组长）"
print(name_list)
print(name_list[::2])   #步长

if 9 in name_list:      #判断列表中9是否存在
    num_of_ele = name_list.count(9)
    position_of_ele = name_list.index(9)
    name_list[position_of_ele] = 999
    print("[%s] 9 is/are in name_lsit,position:[%s]" %(num_of_ele,position_of_ele))
    print(name_list)

for i in range(name_list.count(9)):
    ele_index = name_list.index(9)
    name[ele_index] = 9999999999
    print(name_list)

name_list.extend(name2)
print(name_list)
print(name2)

name_list.reverse()
#反转

name_list.sort()
#排序

name_list.pop(3)
#删除

name3 = name_list.copy()
#复制 copy 第一层数据 不会copy第二层数据

name5 = copy.deepcopy(name_list)
name4 = ['阿','哦',['额','一','吴'],'于','波','破','莫']

name4[2][1] = "二"

print(name4)


r = (1,2,3,4,5) #只读列表
